<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<%include("/common/include.html"){}%>
		<style type="text/css">
			ul{
				height:auto;
				width:100%;
				padding:10px;
			}
			ul li{
				width:230px;
				display:inline-block;
			}
		</style>
	</head>
	<body style="overflow-x:hidden;">
	<input id="ORGANIDS"  type="hidden" value="${orgid!}">
	<form>
	<!-- <%include("/commonUtil/ddcSearchCustomer.html"){}%> -->
	<%include("/commonUtil/ddcSearchBusiness.html"){}%>
	</form>
	<div data-options="region:'center'" style="overflow-x:hidden;">
	<table class="easyui-datagrid" id ="announceInfo" style="width:100%;height:auto;"></table>
	</div>
		
	<script>
	
	function queryBusiness(){
		$('#announceInfo').datagrid({
			cls: "theme-datagrid",
			title:"可修改业务",
			singleSelect: true,
			rownumbers: true, //显示序号
			fitColumns:true,
			pagination: true,
			pageSize: 10,
			url: "replaceZjYwxg/getlist",
			queryParams: {
				'_query.NEWHPHM': $("#HPHM").val(),
				'_query.LSH': $("#LSH").val(),
				'_query.ORGANIDS': $("#ORGANIDS").val(),
				'_query.STATUS':1,
				'_query.TYPE':6,
			},
		    method: 'post',
		    collapsible:true,
		    columns:[[
						{field:'lsh',title:'业务流水号',width:25,align:'center'},
						{field:'cllx',title:'车辆类型',width:10,align:'center'},
						{field:'newhphm',title:'号牌号码',width:7,align:'center'},
						{field:'newownername',title:'车辆所有人',width:9, align:'center'},
						{field:'newownername',title:'证件号码',width:9, align:'center'},
						{field:'organname',title:'业务受理机构',width:15, align:'center'},
						{field:'ywsldate',title:'受理日期',width:10, align:'center'},
						{field:'ywsljbr',title:'经办人',width:7, align:'center'},
						{field:'operate1',title:'操作',width:10, align:'center',
							formatter: function(value,row,index){
								return '<a onclick='+'details(\'' + row.ids + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:red'+' class='+'l-btn-text'+'>编辑</span></span></a>'
							}
						},
						{field:'operate2',title:'业务办理',width:10, align:'center',
							formatter: function(value,row,index){
								return '<a onclick='+'nextprocess(\'' + row.ids + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:red'+' class='+'l-btn-text'+'></span>完成</span></a>'
							}
						}
						]]
		})
		
	}
	
	
	$(document).ready(function () {
		$("#HPHM").combobox({
			onChange: function (n,o) {
				$("#LSH").textbox("clear");
				//$("#SFZMHM").textbox("clear");
				 queryBusiness();
			}
		});
		$("#LSH").combobox({
			onChange: function (n,o) {
				$("#HPHM").textbox("clear");
				//$("#SFZMHM").textbox("clear");
				 queryBusiness();
			}
		});
		/* $("#SFZMHM").combobox({
			onChange: function (n,o) {
				$("#HPHM").textbox("clear");
				$("#LSH").textbox("clear");
				 queryCustomer();
			}
		}); */
		queryBusiness();
	});
	
	function clearsj(){
		location.reload();
	}
	
	/* function operate(){
		return '<a href="#" style="display:inline-block;height:25px;width:80px;background:#1CCE78;line-height:25px;border-radius:3px;color:#ffffff;" onclick="check()">查&nbsp;&nbsp;看</a>';
	} */
	function details(ids){
		loadDialog($('#announceInfo'),null, '业务修改', '${cxt !}/replaceZjYwxg/details?ids=' + ids,1100,700);
	}
	
	function nextprocess(ids){
		 parent.$.messager.confirm('提示信息','确定进入下一流程么？',function(r){
			if (r){
				$.post("replaceZjYwxg/nextprocess",{"ids":ids},function(result){
					$('#announceInfo').datagrid('reload');
				});
			}
		 });
	}
	</script>
	</body>
</html>
